/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sk.stancel.peter.sudoku.core;

/**
 *
 * @author Peter Stancel
 */
public class SudokuCheck implements Runnable {

    private Field field;
    private String string = "Checking Sudoku...";
//    private SwingUI swingUI;

    /**
     * Constructor.
     * @param field field of game
     * @param swingUI
     */
    public SudokuCheck(Field field) {
        this.field = field;
//        this.swingUI = swingUI;
    }

    public void run() {
		if (field.checkIt()) {
			string = "This sudoku has only one solution.";
		} else if (field.playableCheck()) {
			string = "This sudoku has more solutions.";
		} else {
			string = "This sudoku has no solution.";
		}
	}

    /**
     * @return the string
     */
    public String getString() {
        return string;
    }
}
